package com.ruyuan.user.server.controller.request;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author xx
 */
@Data
public class SaveUserRequest {

    private Long id;

    @NotEmpty(message = "姓名不能为空")
    private String name;

    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date entryDate;

    /**
     * 试用时间
     */
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date becomeTrailDate;

    /**
     * 转正时间
     */
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date becomeRegularDate;

    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date birthday;

    @Size(max = 11, min = 11, message = "手机号码长度必须11位")
    private String phone;

    @Email(message = "邮箱格式错误")
    private String email;

    private String identityCardNum;

    private String nation;

    private String recruitType;

    private String address;

    private Integer salary;

    private String level;

    @NotEmpty(message = "工号不能为空")
    private String code;

    private String gender;

    //岗位id
    private Long jobId;

}
